﻿using System.Net;

namespace Core.Framework.CommonExceptions;

public class CommonException : Exception
{
    public CommonException()
    {
    }

    public CommonException(string message) : base(message)
    {
        this.Code = (int)HttpStatusCode.InternalServerError;
        this.Msg = message;
    }

    /// <summary>
    /// 状态码
    /// </summary>
    public int Code { get; set; }

    /// <summary>
    /// 结果数据
    /// </summary>
    public Object Data { get; set; }

    /// <summary>
    /// 错误信息
    /// </summary>
    public string Msg { get; set; }
}
